/**
 * org.assess.oa.system.dao.impl.TbRoleMenuDAOImpl
 */
package org.assess.oa.system.dao.impl;

import java.util.HashMap;
import java.util.Map;

import org.assess.core.dao.BaseDAOImpl;
import org.assess.oa.system.bean.TbRoleMenu;
import org.assess.oa.system.dao.TbRoleMenuDAO;

/**
 * @description 操作角色菜单关联信息的DAO层实现类
 * @author XiaLongxiang
 * @createtime 2012-6-5 上午10:50:57
 */
public class TbRoleMenuDAOImpl extends BaseDAOImpl<TbRoleMenu> implements TbRoleMenuDAO {
    public boolean deleteTbRoleMenuById(String role_menu_id) {
        sqlClient.delete("deleteTbRoleMenuById", role_menu_id);
        return true;
    }
    
    public boolean deleteTbRoleMenuByRoleId(String role_id) {
        sqlClient.delete("deleteTbRoleMenuByRoleId", role_id);
        return true;
    }
    
    public boolean deleteTbRoleMenuByMenuId(String menu_id) {
        sqlClient.delete("deleteTbRoleMenuByMenuId", menu_id);
        return true;
    }
    
    public boolean deleteTbRoleMenuByRoleAndSystem(String role_id, String system_code) {
        Map<String, String> parameters = new HashMap<String, String>();
        parameters.put("role_id", role_id);
        parameters.put("system_code", system_code);
        sqlClient.delete("deleteTbRoleMenuByRoleAndSystem", parameters);
        return true;
    }
}
